<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>+
  <div v-if="isVisible">
  <a href="">注册</a>
  <a href="javascript:void (0)" @click="login()">登录</a>
  </div>

  <div v-else>
  <a href="javascript:void (0)" @click="logout()">退出登录</a>
  <input type="text" v-model="v.arr.name" placeholder="员工姓名">
  <input type="text" v-model="v.arr.salary" placeholder="员工工资">
  <input type="text" v-model="v.arr.job" placeholder="员工工作">
  <input type="button" value="登录" v-on:click="add()">
  </div>

  <table border="1">
    <caption>员工信息</caption>
    <tr>
      <th>编号</th>
      <th>姓名</th>
      <th>工资</th>
      <th>工作</th>
    </tr>
    <tr v-for="(person,i) in v.arr">
      <td>{{i+1}}</td>
      <td>{{person.name}}</td>
      <td>{{person.salary}}</td>
      <td>{{person.job}}</td>
    </tr>
  </table>
</div>

<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
    let v = new Vue({
        el:"body>div",
        data:{
          isVisible:true,
          arr:[{name:"",salary:"",job:""}]
        },
        methods:{
          login(){
            v.isVisible = false;
          },

          logout(){
            v.isVisible = true;
          },

          add(){
            v.arr.push(v.arr.name,v.arr.salary,v.arr.job)
          }
        }
    })
</script>

</body>
</html>